<?php
/*
* teia\webdev\php\util\
* Core functions for array manipulation
*
* @author Bernardo Quibiana
* @date created: 20111002
*
* @date modified: 20111002
* @modified: Bernardo Quibiana
*/

// namespace declaration: Utilities
namespace teia\webdev\php\util;

class ArrayUtil {

	static function arrayToStr($array, $delim = ' ') {
		$str = "";
	
		foreach ($array as $value) {
			$str .= $value . $delim;
		}
	
		return $str;
	}
	
	static function assocArrayToStr($array, $delim = ' ') {
		$str = "";
		if (is_array($array)) {
			foreach ($array as $key => $value) {
				$str .= $key . "=" . $value . $delim;
			}	
		}
		
		return $str;
	}
}

?>